import Api from './request'

// 获取约骑列表
export const getRidingEventListApi = (data) => Api.get("/api/riding-events", data)

// 获取约骑详情
export const getRidingEventsByIdApi = (data) => Api.get(`/api/riding-events/${data.id}`)

// 添加约骑活动
export const postRidingEventsApi = (data) => Api.post(`/api/riding-events`, data)

// 查询自己创建的活动
export const getRidingEventsMyCreateApi = (data) => Api.get(`/api/riding-events/myCreate`, data)

// 查询自己参与的活动
export const getRidingEventsMyApi = (data) => Api.get(`/api/riding-events/my`, data)

// 查看报名用户名单
export const getRidingEventsApplyListApi = (data) => Api.get(`/api/riding-events/${data.id}/applyList`)

// 更新自己的约骑状态
export const putRidingEventsApi = (data) => Api.put(`/api/riding-events`, data)

// 报名约骑
export const postRidingEventsRegister = (data) => Api.post(`/api/riding-events/${data.id}/register`)

// 取消报名
export const postRedingEventsCancel = (data) => Api.post(`/api/riding-events/${data.id}/cancel`)

// 删除约骑
export const deleteRedingEventsApi = (data) => Api.del(`/api/riding-events/${data.id}`)